package com.ruoyi.weixin.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.weixin.mapper.KssVipSettingsMapper;
import com.ruoyi.weixin.domain.KssVipSettings;
import com.ruoyi.weixin.service.IKssVipSettingsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 微信支付vipService业务层处理
 * 
 * @author cfw
 * @date 2021-10-07
 */
@Service
public class KssVipSettingsServiceImpl implements IKssVipSettingsService 
{
    @Autowired
    private KssVipSettingsMapper kssVipSettingsMapper;

    /**
     * 查询微信支付vip
     * 
     * @param id 微信支付vipID
     * @return 微信支付vip
     */
    @Override
    public KssVipSettings selectKssVipSettingsById(Long id)
    {
        return kssVipSettingsMapper.selectKssVipSettingsById(id);
    }

    /**
     * 查询微信支付vip列表
     * 
     * @param kssVipSettings 微信支付vip
     * @return 微信支付vip
     */
    @Override
    public List<KssVipSettings> selectKssVipSettingsList(KssVipSettings kssVipSettings)
    {
        return kssVipSettingsMapper.selectKssVipSettingsList(kssVipSettings);
    }

    /**
     * 新增微信支付vip
     * 
     * @param kssVipSettings 微信支付vip
     * @return 结果
     */
    @Override
    public int insertKssVipSettings(KssVipSettings kssVipSettings)
    {
        kssVipSettings.setCreateTime(DateUtils.getNowDate());
        return kssVipSettingsMapper.insertKssVipSettings(kssVipSettings);
    }

    /**
     * 修改微信支付vip
     * 
     * @param kssVipSettings 微信支付vip
     * @return 结果
     */
    @Override
    public int updateKssVipSettings(KssVipSettings kssVipSettings)
    {
        return kssVipSettingsMapper.updateKssVipSettings(kssVipSettings);
    }

    /**
     * 删除微信支付vip对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteKssVipSettingsByIds(String ids)
    {
        return kssVipSettingsMapper.deleteKssVipSettingsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除微信支付vip信息
     * 
     * @param id 微信支付vipID
     * @return 结果
     */
    @Override
    public int deleteKssVipSettingsById(Long id)
    {
        return kssVipSettingsMapper.deleteKssVipSettingsById(id);
    }
}
